home *** CD-ROM | disk | FTP | other *** search
/ The Complete Utilities To…ka 501 Killer Utilities! / 501 Killer Utilities! (Macworld July 1995).cdr / Programming / OutOfPhase1.1 Source / OutOfPhase Folder / PromotableTypeCheck.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-05  |  1.5 KB  |  49 lines  |  [TEXT/KAHL]

  1. /* PromotableTypeCheck.h */
  2.  
  3. #ifndef Included_PromotableTypeCheck_h
  4. #define Included_PromotableTypeCheck_h
  5.  
  6. /* PromotableTypeCheck module depends on */
  7. /* MiscInfo.h */
  8. /* Audit.h */
  9. /* Debug.h */
  10. /* Definitions.h */
  11. /* PcodeObject */
  12. /* CompilerRoot */
  13. /* Memory */
  14. /* ASTUnaryOperator */
  15. /* ASTExpression */
  16.  
  17. #include "PcodeObject.h"
  18. #include "CompilerRoot.h"
  19.  
  20. /* all memory allocated in this module is through TrashTracker */
  21.  
  22. /* forwards */
  23. struct TrashTrackRec;
  24. struct ASTExpressionRec;
  25.  
  26. /* this routine sees if the right hand type can be promoted (if necessary) to */
  27. /* become the left hand type.  True is returned if that is the case. */
  28. MyBoolean                CanRightBeMadeToMatchLeft(DataTypes LeftType, DataTypes RightType);
  29.  
  30. /* this routine sees if the right hand type MUST be promoted to become */
  31. /* the left hand type.  it is not allowed to call with non-compatible types */
  32. MyBoolean                MustRightBePromotedToLeft(DataTypes LeftType, DataTypes RightType);
  33.  
  34. /* perform a type promotion on an expression */
  35. struct ASTExpressionRec*    PromoteTheExpression(DataTypes OriginalType,
  36.                                     DataTypes DesiredType, struct ASTExpressionRec* OriginalExpression,
  37.                                     long LineNumber, struct TrashTrackRec* TrashTracker);
  38.  
  39. /* make sure the type is scalar */
  40. MyBoolean                IsItAScalarType(DataTypes TheType);
  41.  
  42. /* make sure it is some kind of sequenced scalar */
  43. MyBoolean                IsItASequencedScalarType(DataTypes TheType);
  44.  
  45. /* make sure it is some kind of indexed type */
  46. MyBoolean                IsItAnIndexedType(DataTypes TheType);
  47.  
  48. #endif
  49.